// import clappingListTpl from "../viewsr/clapping_list.html";

class Http {
  get() {
    // fetch就跟ajax一样，可以做ajax请求
    return fetch('/api/?t=1565164488597&pagenum=1&tabnum=1')
      //       把返回来的json字符串转为js对象
      .then(response => response.json())
      .then(result => {
        return result;
      })
  }

  product() {
    return fetch('/apii',{pageNum:3})
      .then(response => response.json())
      .then(result => {
        return result;
      })
  }

  clearSale() {
    return fetch('/guagua')
      .then(response => response.json())
      .then(result => {
        return result;
      })
  }


  clearSale1() {
    return fetch('/sale')
      .then(response => response.json())
      .then(result => {
        return result;
      })
  }


  bWine() {
  return fetch('/fenlei')
    .then(response => response.json())
    .then(result => {
      return result;
    })
}
}
export default new Http()